# coding: utf8

# coding: utf8
import os
cwd = os.getcwd()
format=MARKMIN



#def index():
#    response.content_title = T('Language Menu')
#    response.content_subtitle = T('Change the sites displayed language')
#
#    return dict(message='testing 123')

def index(): return plugin_flatpage()

def about():
    """
    Displays app_name/plugin_flatpages/static/ABOUT
    """
    about_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'ABOUT')
    about_body=open(about_path,'r').read()
    body = MARKMIN(about_body)
    return dict(body=body)

def demo():
    """
    Displays app_name/'plugin_flatpages'/static/DEMO
    """
    response.menu_demo=[
#    (T('flatpages'), False, URL(request.application,T('plugin_flatpages'),'index#content'),
(T('flatpages'), False, URL(request.application,application_controller,'index'),
    [
    ]
   ),
]
    demo_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'DEMO')
    demo_body=open(demo_path,'r').read()
    body = MARKMIN(demo_body)
    return dict(body=body)
    
def readme():
    """
    Displays app_name/'plugin_flatpages'/static/README
    """
    about_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'README')
    about_body=open(about_path,'r').read()
    body = MARKMIN(about_body)
    return dict(body=body)
    
def roadmap():
    """
    Displays app_name/'plugin_flatpages'/static/ROADMAP
    """
    about_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'ROADMAP')
    about_body=open(about_path,'r').read()
    body = MARKMIN(about_body)
    return dict(body=body)
 
def license():
    """
    Displays app_name/'plugin_flatpages'/static/LICENSE
    """
    license_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'LICENSE')
    license_body=open(license_path,'r').read()
    body = MARKMIN(license_body)
    return dict(body=body)
    
def universal_cake():
    """
    Displays app_name/'plugin_flatpages'/static/UNIVERSAL_CAKE
    """
    universal_cake_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages','UNIVERSAL_CAKE')
    universal_cake_body=open(universal_cake_path,'r').read()
    body = MARKMIN(universal_cake_body)
    return dict(body=body)

def voice_of_access():
    """
    Displays app_name/'plugin_flatpages'/static/VOICE_OF_ACCESS
    """
    voice_of_access_path = os.path.join(cwd,'applications',request.application, 'static', 'plugin_flatpages', 'VOICE_OF_ACCESS')
    voice_of_access_body=open(voice_of_access_path,'r').read()
    body = MARKMIN(voice_of_access_body)
    return dict(body=body)
